Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: surround delete <ret> #12496

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

darshanCommits
Copy link
Contributor

closes #12481

also has a commit that adds popup documentation for mdm I never knew about this.

None => return,

let surround_ch = match (event.code, event.char()) {
(KeyCode::Enter, _) => Some('\n'), // special case for <ret>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as #12521 (comment) this needs to search for doc.line_ending.as_str() which means that some of the code in surround needs to be refactored to accept &strs rather than chars

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another alternative, which would make for a simpler implementation would be to use line_to_char to delete line breaks at specific character indices. For example, it would be similar to what i did here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsitency with surround delete and surround add
3 participants